<?php
App::uses('AppModel', 'Model');
/**
 * Contrato Model
 *
 * @property Usuario $Usuario
 * @property TipoContrato $TipoContrato
 * @property Propiedad $Propiedad
 * @property ContratoCliente $ContratoCliente
 * @property Planpago $Planpago
 */
class Contrato extends AppModel {

/**
 * Display field
 *
 * @var string
 */
	public $displayField = 'id';


	//The Associations below have been created with all possible keys, those that are not needed can be removed

/**
 * belongsTo associations
 *
 * @var array
 */
	public $belongsTo = array(
		'User' => array(
			'className' => 'User',
			'foreignKey' => 'user_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'TipoContrato' => array(
			'className' => 'TipoContrato',
			'foreignKey' => 'tipo_contrato_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		),
		'Propiedad' => array(
			'className' => 'Propiedade',
			'foreignKey' => 'propiedad_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);

/**
 * hasMany associations
 *
 * @var array
 */
/*	public $hasAndBelongsToMany = array(
		'Cliente' => array(
			'className' => 'Cliente',
			'foreignKey' => 'cliente_id',
			'conditions' => '',
			'fields' => '',
			'order' => ''
		)
	);*/
 
	public $hasMany = array(
		'ContratoCliente' => array(
			'className' => 'ContratoCliente',
			'foreignKey' => 'contrato_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		),
		'Planpago' => array(
			'className' => 'Planpago',
			'foreignKey' => 'contrato_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);

}
